package com.craney.aboutDrawing
{
	import flash.display.Sprite;
	import flash.geom.Point;
	import flash.geom.Rectangle;
	
	public class TestRectangle extends Sprite
	{
		public function TestRectangle()
		{
			x = 100;
			y = 200;	
				
							
			var rect:Rectangle = new Rectangle(0, 0, 100, 100);
			var rect2:Rectangle = new Rectangle(120, 120, 10, 10);
			
			trace(rect.union(rect2));
			trace(rect.intersects(rect2));
			rect2.offset(-35, -35);
			rect2.offsetPoint(new Point(-10, 0));
			rect2.inflate(10, 0);
			rect2.inflatePoint(new Point(0, 10));
			trace(rect2);
			trace(rect.intersection(rect2));
			trace(rect2.intersects(rect));
			
		}

	}
}